package model.entityes.exception;

import models.ConstantValue;

public class ConstantValueException extends UserException
{
    private static final long serialVersionUID = 1L;
    
    public static ConstantValueException getExceptionWhitUserMessage(String userMessage)
    {
	if( userMessage == null) userMessage = "";
	ConstantValueException err = new ConstantValueException();
	err.setUserException(userMessage);
	return err;
    }
    
    public static ConstantValueException errorGetById(String shortName)
    {
	String errMsg = "";
	if( shortName == null) shortName = "null";
	
	errMsg = "Найдено отличное от 1 количество элементов. "+ ConstantValue.KEY +" = " + shortName;
	return ConstantValueException.getExceptionWhitUserMessage(errMsg);
    }
}
